In order to present the GSEA results in a more digestable format we take the SuSiE output and put it into a nested table that can be viewed conveniently in the browser. For each experiment (gene list + gene set database) the table has three levels.
The top level has information about each component of the model.
The second level reports information on the top gene sets in the the components (the 95% credible set)
The third level reports information on the genes in each gene set.
source('notebooks/pbmcs/functions.R')
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr 1.1.4 ✔ readr 2.1.5
✔ forcats 1.0.0 ✔ stringr 1.5.1
✔ ggplot2 3.5.1 ✔ tibble 3.2.1
✔ lubridate 1.9.4 ✔ tidyr 1.3.1
✔ purrr 1.0.2
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag() masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
data <-readRDS('notebooks/pbmcs/results/nested_table.rds') %>% dplyr::select(-path) %>% dplyr::rename(details = nested_table)
4.1.1 CD19+ B Cells
data %>% dplyr::select(-c(celltype_sanitized, details)) %>%filter(celltype =='CD19+ B') %>%reactable(details =make_get_details(data))
4.1.2 CD14+ Monocyte
data %>% dplyr::select(-c(celltype_sanitized, details)) %>%filter(celltype =='CD14+ Monocyte') %>%reactable(details =make_get_details(data))
4.1.3 CD34+
data %>% dplyr::select(-c(celltype_sanitized, details)) %>%filter(celltype =='CD34+') %>%reactable(details =make_get_details(data))
4.1.4 CD56+ NK
data %>% dplyr::select(-c(celltype_sanitized, details)) %>%filter(celltype =='CD56+ NK') %>%reactable(details =make_get_details(data))